package com.zhentao.controller;


import com.zhentao.domain.SysPowerCabinet;
import com.zhentao.domain.vo.Result;
import com.zhentao.service.SysPowerCabinetService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/cabinet")
@Tag(name = "电池柜管理")
public class CabinetController {
    @Autowired
    private SysPowerCabinetService sysPowerCabinetService;

    @GetMapping("/info/{sid}")
    @Operation(summary = "获取站点下的电柜列表")
    public Result<List<SysPowerCabinet>> getCabinetInfo(@PathVariable("sid") Integer sid){
        return sysPowerCabinetService.getCabinetInfo(sid);
    }
}
